package com.shfl.app;

import com.shfl.stock.Stock;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

public class One extends Application {
 
	@Override
	public void start(Stage primaryStage) throws Exception{
		
		Stock.MIAN_STAGE = primaryStage;
		Parent root = FXMLLoader.load(getClass().getResource("/fxml/Main.fxml"));
        Stock.MIAN_STAGE.setTitle("泰噗考勤");
        Stock.MIAN_STAGE.getIcons().add(new Image("/path/taipu.png"));
        Stock.MIAN_STAGE.setScene(new Scene(root));
        Stock.MIAN_STAGE.show(); 
    }
 
	public void  showWindow() throws Exception {
		start(Stock.MIAN_STAGE);
	}
	
	@Override
	public void stop() throws Exception {
		Stock.MIAN_STAGE.hide();
	}
}